package com.zabra.zl.ui.leadpage;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import com.click.guide.guide_lib.GuideCustomViews;
import com.click.guide.guide_lib.interfaces.CallBack;
import com.orhanobut.logger.Logger;
import com.zabra.zl.R;

public class LeadPageActivity extends AppCompatActivity implements CallBack {
    private GuideCustomViews GuideCustomViews;
    private final int[] mPageImages = {
            R.mipmap.splash1,
            R.mipmap.splash2,
            R.mipmap.splash3,
            R.mipmap.splash4,
            R.mipmap.splash5
    };

    private final int[] mGuidePoint = {
            R.mipmap.ic_launcher_round,
            R.mipmap.ic_launcher_round
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_lead_page);

        GuideCustomViews = findViewById(R.id.guide_CustomView);
        GuideCustomViews.setData(mPageImages, mGuidePoint, this);
    }

    @Override
    public void callSlidingPosition(int i) {
        Logger.d("滑动位置 callSlidingPosition " + i);
    }

    @Override
    public void callSlidingLast() {
        Logger.d("滑动到最后一个callSlidingLast");
    }

    @Override
    public void onClickLastListener() {
        Logger.d("点击最后一个view");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        GuideCustomViews.clear();
    }
}
